<template>
	<div>
		{{user.name}}
        <button @click="setUserName">change</button>
	</div>
</template>
<script>
import store from "./store";
export default {
	data() {
		return {
			user: store.state.user,
		};
    },
    methods:{
        setUserName() {
            store.setUserName('1')
        }
    },
};
</script>
<style lang="scss" scoped>
</style>